﻿<%@ Page Language="C#" MasterPageFile="~/YUIAspNet.Master" AutoEventWireup="true" CodeBehind="ColorPickerButton.aspx.cs" Inherits="YUIAspNetDemo.Button.ColorPickerButton" Title="Untitled Page" %>

<%@ Register Src="~/Button/UserControls/ColorPickerButton.ascx" TagName="ColorPickerButton" TagPrefix="yuiUC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>YUIAsp.Net Controls : LiveDemo : Button : ColorPicker Button</title>
    
     <style type="text/css">
        /* hide all controls.. */
        .yui-picker-swatch {display:none}
        .yui-picker-websafe-swatch {display:none}
        .yui-picker-controls{display:none}
        .yui-picker-websafe-swatch2{display:none}
        
        .yui-overlay {border:solid 1px #000; background-color:#eaebec; z-index:1}
        
        .bborder {border:solid 1px #000}
    </style>
    
    <script type="text/javascript">
        function ColorChangedMenu(sender, args)
        {
            $get("myColorDisplayMenu").style.backgroundColor = "rgb(" + args.newValue.join(",") + ")";
        }
        
        function ColorChangedSplit(sender, args)
        {
            $get("myColorDisplaySplit").style.backgroundColor = "rgb(" + args.newValue.join(",") + ")";
        }
        
        
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>ColorPicker button</h1>
    
    <p>The YUIAsp.Net ColorPickerButton control is a combination between the menu/split button and color picker.</p>
    
    <p>It allows easy and compact input for choosing a color.</p>
    
    <h1>Color picker in menu button</h1>
    <p>
        <yuiUC:ColorPickerButton ID="cpButton" OnColorChange="ColorChangedMenu" runat="server" />
    </p>
    
    <h1>Color picker in split button</h1>
    <p>
        <yuiUC:ColorPickerButton ID="cpButtonSplit" OnColorChange="ColorChangedSplit" ButtonType="Split" runat="server" />
    </p>
</asp:Content>
